/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.wider.foundation.event;

import java.util.Set;

/**
 * The interface describe how the classes which are designed to be a target of event(s).
 * EventTarget implementation can ACCEPT ALL events by ignoring implementing the accept() method.
 * The implementation can be limited in some set of events by putting logic inside the accept() method and between
 * the fire() and addEventListener().
 *
 * @author William Choi <avextk@gmail.com>
 */
public interface EventTarget {
    public void fire(Event event);
    public void addEventListener(String event_id, EventListener listener);
    public void removeEventListener(String event_id, EventListener listener);
    public Set getListeningEvents(String...keywords);
    public Set getRegardedEvents(String...keywords);
}
